package com.gjm.demo.component;

import com.gjm.demo.bean.Student;
import jakarta.annotation.Resource;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Component;

@Component
public class ComponentTest {

    @Qualifier("getStudent2")
    @Autowired
//    @Resource(name = "student1")
    private Student student;

    public void print() {
        System.out.println("component");
        System.out.println(student);
    }
}
